<template>
	<div class="nav-body-bar" id="body-nav-bar">
		<div class="container">
			<div class="nav-box">
				<div class="row">
					<template v-for="(item,$index) in nav_bar">
						<div class="col nav-item-ico">
							<a href="javascript:;" @click="Madian(item.label)" :data-id="item.label">
								<div class="bar-item">
									<span>
										<i :class="item.icon"></i>
										{{item.name}}
									</span>
								</div>
							</a>
						</div>
					</template>
				</div>
			</div>
		</div>
	</div>
</template>
<script>
	import {scroll,MaoDian} from '../../gloab/ico'
	export default{
		data(){
			return{
				nav_bar:[
					{
						name: "项目",
						label: "project",
						icon: "fa fa-product-hunt",
						id: "#project"
					},
					{
						name: "市场",
						label: "market",
						icon: "fa fa-line-chart",
						id: "#market"
					},
					{
						name: "运营",
						label: "operation",
						icon: "fa fa-user-circle",
						id: "#operation"
					},
					{
						name: "团队",
						label: "team",
						icon: "fa fa-steam",
						id: "#team"
					},
					{
						name: "风险",
						label: "risk",
						icon: "fa fa-warning",
						id: "#risk"
					},
					{
						name: "代码",
						label: "code",
						icon: "fa fa-code",
						id: "#code"
					},
					{
						name: "快讯",
						label: "news",
						icon: "fa fa-newspaper-o",
						id: "#news"
					}
				]
			}
		},
		created(){
			if(this.$route.name == 'ico'){
				window.addEventListener('scroll',this.scroller,true)
			}
		},
		methods: {
			scroller() {
				if(this.$route.name == 'ico'){
					let befor = $(window).scrollTop();
					scroll(befor);
				}
			},
			Madian(id){
				
				MaoDian(id)
			}
		},
	}
	
</script>
<style scoped="scoped">
	.nav-body-bar{
		position: relative;
		min-height: 50px;
		margin-bottom: 20px;
		border: 1px solid transparent;
	}
	.nav-box{
		width: 100%;
		background-color: #FFFFFF;
		overflow: hidden;
		border-radius: 10px;
		-webkit-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16);
		box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16);
	}
	a:hover{
		text-decoration: none;
		color: #0069D9;
	}
	.bar-item{
		text-align: center;
		padding: 15px 0;
	}
	
</style>